package com.cc.model.entity;

import com.cc.model.vo.InventoryVo;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author CC
 * @version 1.0
 * @description: 库存告警消息类
 * @date 2025/10/16 8:38
 */
@Data
public class InventoryAlert {
    // 消息类型
    private String type = "INVENTORY_ALERT";
    // 告警商品
    private List<InventoryVo> lowStockProducts;
    // 告警时间
    private LocalDateTime alertTime;
    // 告警信息
    private String message;

    public InventoryAlert(List<InventoryVo> lowStockProducts, String message) {
        this.alertTime = LocalDateTime.now();
        this.lowStockProducts = lowStockProducts;
        this.message = message;
    }
}
